import request from '@/utils/request'

export function loginByPhone({ phone, password }) {
  return request({
    url: '/authorization/code',
    method: 'post',
    data: {
      phone,
      password,
      clientId: 'V9IERd6YtVFURD077tqWnlNDjW0=',
      redirectUri: '',
      responseType: 'code'
    }
  })
}

export function fetchTokens(code) {
  return request({
    url: '/authorization/token',
    method: 'post',
    data: {
      grantType: 'authorization_code',
      code,
      clientId: 'V9IERd6YtVFURD077tqWnlNDjW0=',
      redirectUri: ''
    }
  })
}
